package com.ruyuan.rapid.disruptor.quicklystart;

import com.lmax.disruptor.EventHandler;

public class OrderEventHandler implements EventHandler<OrderEvent> {

    @Override
    public void onEvent(OrderEvent event, long sequence, boolean endOfBatch) throws Exception {
//        Thread.sleep(RandomUtils.nextInt(1, 100));
        System.out.println(Thread.currentThread().getName());
        System.out.println("消费者消费: " + event.getValue());
    }
}
